import Vue from 'vue'
import Router from 'vue-router'
import Index from './views/index.vue'
const Login = () => import(/* webpackChunkName: "login" */ '@/views/login/Login.vue')
const RechargeRecord = () => import(/* webpackChunkName: "rechargeRecord" */ '@/views/rechargeRecord/index.vue')
const OrderManage = () => import(/* webpackChunkName: "orderManage" */ '@/views/orderManage/index.vue')
const AgencyManage = () => import(/* webpackChunkName: "agencyManage" */ '@/views/agencyManage/index.vue')
const ResManage = () => import(/* webpackChunkName: "resManage" */ '@/views/resManage/index.vue')
const ReportManage = () => import(/* webpackChunkName: "reportManage" */ '@/views/reportManage/index.vue')
const MemberManage = () => import(/* webpackChunkName: "memberManage" */ '@/views/memberManage/index.vue')
const BetsManage = () => import(/* webpackChunkName: "betsManage" */ '@/views/betsManage/index.vue')
const DrawManage = () => import(/* webpackChunkName: "drawManage" */ '@/views/drawManage/index.vue')
const DepositManage = () => import(/* webpackChunkName: "depositManage" */ '@/views/depositManage/index.vue')
const NoticeManage = () => import(/* webpackChunkName: "noticeManage" */ '@/views/noticeManage/index.vue')
const AuthorityManage = () => import(/* webpackChunkName: "authorityManage" */ '@/views/authorityManage/index.vue')

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      children: [
        { name: 'rechargeRecord', path: 'rechargeRecord', component: RechargeRecord },
        { name: 'orderManage', path: 'orderManage', component: OrderManage },
        { name: 'agencyManage', path: 'agencyManage', component: AgencyManage },
        { name: 'resManage', path: 'resManage', component: ResManage },
        { name: 'reportManage', path: 'reportManage', component: ReportManage },
        { name: 'memberManage', path: 'memberManage', component: MemberManage },
        { name: 'betsManage', path: 'betsManage', component: BetsManage },
        { name: 'drawManage', path: 'drawManage', component: DrawManage },
        { name: 'depositManage', path: 'depositManage', component: DepositManage },
        { name: 'noticeManage', path: 'noticeManage', component: NoticeManage },
        { name: 'authorityManage', path: 'authorityManage', component: AuthorityManage }
      ]
    },
    { path: '/login', name: 'login', component: Login }
  ]
})
